
<template>
  <div class="main">
    <van-nav-bar :title="title" v-if="iswx" />
    <van-nav-bar v-else :title="title" left-text="返回" left-arrow @click-left="onClickLeft" />
    <div>
      <game :title="title" v-if="isLook" />
    </div>
 

  </div>
</template>
<script setup lang="ts">
import navBarItem from '@/components/tabber.vue'
import TestJson from '@/data/map.json'
import { ref, reactive, onMounted, nextTick } from 'vue'
import { getAssetURL, checkCondition, getRealm } from '@/utils/index.ts'
import { useRouter, useRoute } from 'vue-router'
import game from '@/components/games/index.vue'
import useUserStore from '@/store/modules/user'
const router = useRouter()
const route = useRoute()
const mapList =ref([])
const userInfo = ref({})
const title = ref<string>('')
const isLook = ref<boolean>(true)
const iswx = ref<boolean>(false)
onMounted(() => {
  title.value = route.query.mapName  as any
  iswx.value = useUserStore().wx
})
const onClickLeft = () => {
  history.back()
}
</script>
<style lang="scss" scoped>
.main {
  min-height: 100vh;
  background: #f5f5f5;
}
</style>
